<!--
 * @Author: your name
 * @Date: 2019-10-30 17:41:59
 * @LastEditTime: 2019-11-04 14:04:32
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \wwwroot\packs_vue\src\views\dashboard\index.vue
 -->
<template>
  <div class="dashboard-container">
    <component :is="currentRole" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import adminDashboard from './admin'
import editorDashboard from './editor'

export default {
  name: 'Dashboard',
  components: { adminDashboard, editorDashboard },
  data() {
    return {
      currentRole: 'adminDashboard'
    }
  },
  computed: {
    ...mapGetters([
      'roles'
    ])
  },
  created() {
    // if (!this.roles.includes('admin')) {
    //   console.log(true)
    //   this.currentRole = 'editorDashboard'
    // }
  }
}
</script>
